
package com.qgs.waf.controller.zbks;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.qgs.waf.service.ZbksComprehensiveSituationService;

@Controller
@RequestMapping(value = "/zbks/cs")
public class ZbksComprehensiveSituationController {

	@Autowired
	private ZbksComprehensiveSituationService comprehensiveSituationImpl;

	@RequestMapping
	public String comprehensiveSituation() {
		return "comprehensiveSituation/cs";
	}

	@ResponseBody
	@RequestMapping(value = "/csPie", produces = "application/json; charset=utf-8")
	public String statisticsAttacksPie() {
		return comprehensiveSituationImpl.statisticsAttacksPie();
	}

	@ResponseBody
	@RequestMapping(value = "/{type}", produces = "application/json; charset=utf-8")
	public String statisticsAttacksByType(@PathVariable String type) {
		return comprehensiveSituationImpl.statisticsAttacksByType(type);
	}

	@ResponseBody
	@RequestMapping(value = "/list", produces = "application/json; charset=utf-8")
	public String statisticsAttacksList(@RequestParam(value="size",required=false,defaultValue="20") long size) {
		return comprehensiveSituationImpl.statisticsAttacksList(size);
	}
}
